<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("platformCompare:ipCharts:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
            <select style="height: 0" id="ipTotal_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>
        </div>

        <div id="ipTotal" style="width: 100%;height:370px;"></div>
    </div>
 </div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("platformCompare:forwardArticleCharts:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
            <select style="height: 0" id="badIp_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>
        </div>

    <div id="badIp" style="width: 100%;height:370px;"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("platformCompare:newUsersCharts:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
            <select style="height: 0" id="newUsers_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>
        </div>

    <div id="newUsers" style="width: 100%;height:370px;"></div>
</div>
</div>
<div class="row chartsBox">
 <div class="col-md-12">

     <div class="exportExcelBox">
         <#if shiro.hasPermission("platformCompare:activeUsersChart:exportExcel")>
         <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
     </#if>
         <select style="height: 0" id="activeUsers_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>
     </div>

    <div id="activeUsers" style="width: 100%;height:370px;"></div>
</div>
</div>


<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("chartDetials:ipChart:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
            <select style="height: 0" id="articleTotal_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>
        </div>

        <div id="articleTotal" style="width: 100%;height:370px;"></div>
    </div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("platformCompare:newArticleCharts:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
            <select style="height: 0" id="shareArticle_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>
        </div>

        <div id="shareArticle" style="width: 100%;height:370px;"></div>
    </div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:shareArticleNum:lineExport")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="shareArticleNum_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>
    </div>

    <div id="shareArticleNum" style="width: 100%;height:370px;"></div>
</div>
</div>
<!--<div class="row chartsBox">-->
    <!--<div class="col-md-12">-->
        <!--<#if shiro.hasPermission("platformCompare:badIpCharts:exportExcel")>-->
        <!--<div class="exportExcelBox">-->
            <!--<span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>-->
        <!--</div>-->
        <!--</#if>-->
        <!--<div id="sharePeoples" style="width: 100%;height:370px;"></div>-->
    <!--</div>-->
<!--</div>-->

<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("platformCompare:badIpCharts:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
            <select style="height: 0" id="income_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>
        </div>

    <div id="income" style="width: 100%;height:370px;"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("platformCompare:badIpCharts:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
            <select style="height: 0" id="ipUse_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

        </div>

     <div id="ipUse" style="width: 100%;height:370px;"></div>
</div>
</div>

<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:forwardIncome:chartExport")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="forwardIncome3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="forwardIncome3" style="width: 100%;height:370px;"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:h5Income:chartExport")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="h5Income3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="h5Income3" style="width: 100%;height:370px;"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:forwardIpUse:chartExport")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="forwardIpUse3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="forwardIpUse3" style="width: 100%;height:370px;"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:h5IpUse:chartExport")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="h5IpUse3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="h5IpUse3" style="width: 100%;height:370px;"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:forwardOutIncome:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="forwardOutIncome3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="forwardOutIncome3" style="width: 100%;height:370px;"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:forwardInsideIncome:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="forwardInsideIncome3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="forwardInsideIncome3" style="width: 100%;height:370px;"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:forwardOutIpUse:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="forwardOutIpUse3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="forwardOutIpUse3" style="width: 100%;height:370px;"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:forwardInsideIpUse:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="forwardInsideIpUse3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="forwardInsideIpUse3" style="width: 100%;height:370px;"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:newTotalIncome:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="newTotalInocme3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="newTotalInocme3" style="width: 100%;height:370px;"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:newForwardIncome:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="newForwardInocme3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="newForwardInocme3" style="width: 100%;height:370px;"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:newH5Income:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="newH5Inocme3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="newH5Inocme3" style="width: 100%;height:370px;"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:newIpUse:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="newIpUse3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="newIpUse3" style="width: 100%;height:370px;"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:newForwardIpUse:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="newForwardIpUse3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="newForwardIpUse3" style="width: 100%;height:370px;"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:newH5IpUse:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="newH5IpUse3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="newH5IpUse3" style="width: 100%;height:370px;"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:newForwardOutIncome:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="newForwardOutIncome3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="newForwardOutIncome3" style="width: 100%;height:370px;"></div>
</div>
</div>
<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:newForwardInsideIncome:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="newForwardInsideIncome3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="newForwardInsideIncome3" style="width: 100%;height:370px;"></div>
</div>
</div>

<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:newForwardOutIpUse:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="newForwardOutIpUse3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="newForwardOutIpUse3" style="width: 100%;height:370px;"></div>
</div>
</div>

<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:newForwardInsideIpUse:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="newForwardInsideIpUse3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="newForwardInsideIpUse3" style="width: 100%;height:370px;"></div>
</div>
</div>

<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:comparePriceIp:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="comparePriceIp3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="comparePriceIp3" style="width: 100%;height:370px;"></div>
</div>
</div>

<div class="row chartsBox">
    <div class="col-md-12">

        <div class="exportExcelBox">
            <#if shiro.hasPermission("compareChart:comparePriceExpend:exportExcel")>
            <span class="exportExcelBtn"><i class="fa fa-download" style="padding-right: 5px;"></i>导出</span>
        </#if>
        <select style="height: 0" id="comparePriceExpend3_select" data-actions-box="true" data-select-all-text="全选" data-deselect-all-text="取消全选"  title="所有平台" multiple ></select>

    </div>

    <div id="comparePriceExpend3" style="width: 100%;height:370px;"></div>
</div>
</div>

<script type="text/javascript">
     $(function () {
        chartPage.init();
     });
    var allData;
    var ipDetail;
    var isLoading = false;
    var ipLoading = false;
    var chartPage = {
        init:function (time,timeType) {
            var _this = this;
            _this.setTimer(time,timeType);
           // _this.goToDetails();
        },
       showChart:function () {
            isAuth("compareChart:newUsers:newUsersCharts")?this.chartInt('newUsers','新增用户'):hideDom2("#newUsers");
            isAuth("compareChart:activeUsers:activeUsersCharts")?this.chartInt('activeUsers','活跃用户'):hideDom2("#activeUsers");
            isAuth("compareChart:ip:ipCharts")?this.chartInt('ipTotal','IP数'):hideDom2("#ipTotal");
            isAuth("compareChart:newArticle:newArticleCharts")?this.chartInt('articleTotal','新增文章'):hideDom2("#articleTotal");
            isAuth("compareChart:badIp:badIpCharts")?this.chartInt('badIp','被封域名'):hideDom2("#badIp");
            isAuth("compareChart:forwardArticle:forwardArticleCharts")?this.chartInt('shareArticle','转发文章数'):hideDom2("#shareArticle");
           // isAuth("compareChart:sharePeoples:sharePeoplesCharts")?this.chartInt('sharePeoples','转发文章人数'):'';
            isAuth("compareChart:ipUse:ipUseChart")?this.chartInt('ipUse','ip消耗'):hideDom2("#ipUse");
            isAuth("compareChart:income:incomeChart")?this.chartInt('income','收益'):hideDom2("#income");
            isAuth("compareChart:shareArticleNum:lineChart")?this.chartInt('shareArticleNum','收益'):hideDom2("#shareArticleNum");
            //compareChart:forwardIncome:showCharts
           isAuth("compareChart:forwardIncome:showCharts")?this.chartInt('forwardIncome3','转发区收益'):hideDom2("#forwardIncome3");
           //compareChart:h5Income:showCharts
           isAuth("compareChart:h5Income:showCharts")?this.chartInt('h5Income3','h5收益'):hideDom2("#h5Income3");
           //compareChart:forwardIpUse:showCharts
           isAuth("compareChart:forwardIpUse:showCharts")?this.chartInt('forwardIpUse3','转发区IP消耗'):hideDom2("#forwardIpUse3");
           //compareChart:h5IpUse:showCharts
           isAuth("compareChart:h5IpUse:showCharts")?this.chartInt('h5IpUse3','h5IP消耗'):hideDom2("#h5IpUse3");
           //compareChart:newTotalIncome:showCharts
           isAuth("compareChart:newTotalIncome:showCharts")?this.chartInt('newTotalInocme3','新广告系统收益'):hideDom2("#newTotalInocme3");
           //compareChart:newForwardIncome:showCharts
           isAuth("compareChart:newForwardIncome:showCharts")?this.chartInt('newForwardInocme3','新广告系统转发区收益'):hideDom2("#newForwardInocme3");
           //compareChart:newH5Income:showCharts
           isAuth("compareChart:newH5Income:showCharts")?this.chartInt('newH5Inocme3','新广告系统h5收益'):hideDom2("#newH5Inocme3");
           //compareChart:newIpUse:showCharts
           isAuth("compareChart:newIpUse:showCharts")?this.chartInt('newIpUse3','新广告系统IP消耗'):hideDom2("#newIpUse3");
           //compareChart:newForwardIpUse:showCharts
           isAuth("compareChart:newForwardIpUse:showCharts")?this.chartInt('newForwardIpUse3','新广告系统转发区IP消耗'):hideDom2("#newForwardIpUse3");
           //compareChart:newH5IpUse:showCharts
           isAuth("compareChart:newH5IpUse:showCharts")?this.chartInt('newH5IpUse3','新广告系统h5IP消耗'):hideDom2("#newH5IpUse3");
           //compareChart:forwardOutIncome:showCharts
           isAuth("compareChart:forwardOutIncome:showCharts")?this.chartInt('forwardOutIncome3','转发区外部收益'):hideDom2("#forwardOutIncome3");
           //compareChart:forwardInsideIncome:showCharts
           isAuth("compareChart:forwardInsideIncome:showCharts")?this.chartInt('forwardInsideIncome3','转发区内部收益'):hideDom2("#forwardInsideIncome3");
           //compareChart:forwardOutIpUse:showCharts
           isAuth("compareChart:forwardOutIpUse:showCharts")?this.chartInt('forwardOutIpUse3','转发区外部ip消耗'):hideDom2("#forwardOutIpUse3");
           //compareChart:forwardInsideIpUse:showCharts
           isAuth("compareChart:forwardInsideIpUse:showCharts")?this.chartInt('forwardInsideIpUse3','转发区内部ip消耗'):hideDom2("#forwardInsideIpUse3");
           //compareChart:newForwardOutIncome:showCharts
           isAuth("compareChart:newForwardOutIncome:showCharts")?this.chartInt('newForwardOutIncome3','新转发区外部收益'):hideDom2("#newForwardOutIncome3");
           //compareChart:newForwardInsideIncome:showCharts
           isAuth("compareChart:newForwardInsideIncome:showCharts")?this.chartInt('newForwardInsideIncome3','新转发区内部收益'):hideDom2("#newForwardInsideIncome3");
          //compareChart:newForwardOutIpUse:showCharts
           isAuth("compareChart:newForwardOutIpUse:showCharts")?this.chartInt('newForwardOutIpUse3','新转发区外部ip消耗'):hideDom2("#newForwardOutIpUse3");
           //compareChart:newForwardInsideIpUse:showCharts
           isAuth("compareChart:newForwardInsideIpUse:showCharts")?this.chartInt('newForwardInsideIpUse3','新转发区内部ip消耗'):hideDom2("#newForwardInsideIpUse3");
           //compareChart:comparePriceIp:showCharts
           isAuth("compareChart:comparePriceIp:showCharts")?this.chartInt('comparePriceIp3','竞价ip消耗'):hideDom2("#comparePriceIp3");
           //compareChart:comparePriceExpend:showCharts
           isAuth("compareChart:comparePriceExpend:showCharts")?this.chartInt('comparePriceExpend3','竞价收益'):hideDom2("#comparePriceExpend3");
        },
        goToDetails:function () {
            $("#goDetails").click(function () {
                window.location.href = "modules/view/mainDetails.html";
            });
        },
        setHours:function () {
            var hours = [];
            for (let i=0;i<24;i++){
                if(i<10){
                    hours.push(0 + '' + i + ':00');
                }else{
                    hours.push(i + ':00');
                }

            };
            //console.log(hours);
            return hours;
        },
        setTimer:function (time,timeType) {
            var _this = this;
           // _this.getData();
            _this.showChart();
            _this.getIp(time,timeType);
            _this.getForwardArticle(time,timeType);
            _this.getNewArticle(time,timeType);
            _this.getBadIp(time,timeType);
            _this.getNewUser(time,timeType);
            _this.getActiveUser(time,timeType);
            _this.getIncomeData(time,timeType);
            _this.getIpUseData(time,timeType);
            _this.getShareArticleNum(time,timeType);
            _this.getForwardIncome3(time,timeType);
            _this.getH5Income3(time,timeType);
            _this.getForwardIpUse3(time,timeType);
            _this.getH5IpUse3(time,timeType);
            _this.getNewTotalIncome3(time,timeType);
            _this.getNewForwardIncome3(time,timeType);
            _this.getNewH5Income3(time,timeType);
            _this.getNewIpUse3(time,timeType);
            _this.getNewForWardIpUse3(time,timeType);
            _this.getNewH5IpUse3(time,timeType);
            _this.getForwardOutIncome3(time,timeType);
            _this.getForwardInsideIncome3(time,timeType);
            _this.getForwardOutIpUse3(time,timeType);
            _this.getForwardInsideIpUse3(time,timeType);
            _this.getNewForwardOutIncome3(time,timeType);
            _this.getNewForwardInsideIncome3(time,timeType);
            _this.getNewForwardOutIpUse3(time,timeType);
            _this.getNewForwardInsideIpUse3(time,timeType);
            _this.getComparePriceIp3(time,timeType);
            _this.getComparePriceExpend3(time,timeType);
           // _this.getSharePeoples(time,timeType);

            $.ajax({
                type : "get",
                url : baseURL+"platform/findAllPlatform",
                cache : false,
                contentType : false,
                processData : false,
                dataType : "json",
                success: function(data) {
                    if(data.code==0){
                        var _html = ''
                        for(var i=0;i<data.platformList.length;i++){
                            _html = _html + '<option value="'+data.platformList[i].nickName+'">'+data.platformList[i].nickName+'</option>'
                        }
                        $('#newUsers_select').html(_html);
                        $('#newUsers_select').selectpicker('refresh');
                        $('#ipTotal_select').html(_html);
                        $('#ipTotal_select').selectpicker('refresh');
                        $('#badIp_select').html(_html);
                        $('#badIp_select').selectpicker('refresh');
                        $('#ipUse_select').html(_html);
                        $('#ipUse_select').selectpicker('refresh');

                        $('#activeUsers_select').html(_html);
                        $('#activeUsers_select').selectpicker('refresh');
                        $('#articleTotal_select').html(_html);
                        $('#articleTotal_select').selectpicker('refresh');
                        $('#shareArticle_select').html(_html);
                        $('#shareArticle_select').selectpicker('refresh');
                        $('#income_select').html(_html);
                        $('#income_select').selectpicker('refresh');
                        $('#shareArticleNum_select').html(_html);
                        $('#shareArticleNum_select').selectpicker('refresh');
                        $('#forwardIncome3_select').html(_html);
                        $('#forwardIncome3_select').selectpicker('refresh');
                        $('#h5Income3_select').html(_html);
                        $('#h5Income3_select').selectpicker('refresh');

                        $('#forwardIpUse3_select').html(_html);
                        $('#forwardIpUse3_select').selectpicker('refresh');

                        $('#h5IpUse3_select').html(_html);
                        $('#h5IpUse3_select').selectpicker('refresh');

                        $('#newTotalInocme3_select').html(_html);
                        $('#newTotalInocme3_select').selectpicker('refresh');

                        $('#newForwardInocme3_select').html(_html);
                        $('#newForwardInocme3_select').selectpicker('refresh');

                        $('#newH5Inocme3_select').html(_html);
                        $('#newH5Inocme3_select').selectpicker('refresh');

                        $('#newIpUse3_select').html(_html);
                        $('#newIpUse3_select').selectpicker('refresh');

                        $('#newForwardIpUse3_select').html(_html);
                        $('#newForwardIpUse3_select').selectpicker('refresh');

                        $('#newH5IpUse3_select').html(_html);
                        $('#newH5IpUse3_select').selectpicker('refresh');

                        $('#forwardOutIncome3_select').html(_html);
                        $('#forwardOutIncome3_select').selectpicker('refresh');

                        $('#forwardInsideIncome3_select').html(_html);
                        $('#forwardInsideIncome3_select').selectpicker('refresh');

                        $('#forwardOutIpUse3_select').html(_html);
                        $('#forwardOutIpUse3_select').selectpicker('refresh');

                        $('#forwardInsideIpUse3_select').html(_html);
                        $('#forwardInsideIpUse3_select').selectpicker('refresh');

                        $('#newForwardOutIncome3_select').html(_html);
                        $('#newForwardOutIncome3_select').selectpicker('refresh');

                        $('#newForwardInsideIncome3_select').html(_html);
                        $('#newForwardInsideIncome3_select').selectpicker('refresh');

                        $('#newForwardOutIpUse3_select').html(_html);
                        $('#newForwardOutIpUse3_select').selectpicker('refresh');

                        $('#newForwardInsideIpUse3_select').html(_html);
                        $('#newForwardInsideIpUse3_select').selectpicker('refresh');

                        $('#comparePriceIp3_select').html(_html);
                        $('#comparePriceIp3_select').selectpicker('refresh');

                        $('#comparePriceExpend3_select').html(_html);
                        $('#comparePriceExpend3_select').selectpicker('refresh');

                    }else{
                        layer.msg('数据获取失败');
                    }
                },
                error:function(){
                    layer.msg('数据获取失败');
                }
            });
         },
        getComparePriceExpend3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:comparePriceExpend:showCharts",
                url: baseURL+"biddingSingleStatis/getBiddingSingleCostStatisChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showComparePriceExpend3(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getComparePriceIp3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:comparePriceIp:showCharts",
                url: baseURL+"biddingSingleStatis/getBiddingSingleClickIpStatisChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showComparePriceIp3(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewForwardInsideIpUse3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:newForwardInsideIpUse:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemForwardAreaInStatisIpContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showNewForwardInsideIpUse3(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewForwardOutIpUse3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:newForwardOutIpUse:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemForwardAreaOutStatisIpContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showNewForwardOutIpUse3(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewForwardInsideIncome3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:newForwardInsideIncome:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemCustomerForwardAreaInExpandPriceContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showNewForwardInsideIncome3(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewForwardOutIncome3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:newForwardOutIncome:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemCustomerForwardAreaOutExpandPriceContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showNewForwardOutIncome3(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getForwardInsideIpUse3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:forwardInsideIpUse:showCharts",
                url: baseURL+"customerStatis/getForwardAreaInStatisIpContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showForwardInsideIpUse3(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getForwardOutIpUse3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:forwardOutIpUse:showCharts",
                url: baseURL+"customerStatis/getForwardAreaOutStatisIpContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showForwardOutIpUse3(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getForwardInsideIncome3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:forwardInsideIncome:showCharts",
                url: baseURL+"customerStatis/getForwardAreaInExpandPriceContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showForwardInsideIncome3(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getForwardOutIncome3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:forwardOutIncome:showCharts",
                url: baseURL+"customerStatis/getForwardAreaOutExpandPriceContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showForwardOutIncome3(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewH5IpUse3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:newH5IpUse:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemH5StatisIpContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showNewH5IpUseCharts2(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewForWardIpUse3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:newForwardIpUse:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemForwardAreaStatisIpContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showNewForwardIpUseCharts2(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewIpUse3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:newIpUse:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemStatisIpContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showNewIpUseCharts2(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewH5Income3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:newH5Income:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemCustomerH5ExpandPriceContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showNewH5IncomeCharts2(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewForwardIncome3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:newForwardIncome:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemCustomerForwardAreaExpandPriceContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showNewForwardIncomeCharts2(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewTotalIncome3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:newTotalIncome:showCharts",
                url: baseURL+"articleStatisNew/getNewSystemCustomerExpandPriceContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showNewTotalIncomeCharts2(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getH5IpUse3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:h5IpUse:showCharts",
                url: baseURL+"customerStatis/getH5StatisIpContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showH5IpUseCharts2(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getForwardIpUse3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:forwardIpUse:showCharts",
                url: baseURL+"customerStatis/getForwardAreaStatisIpContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showForwardIpUseCharts2(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getH5Income3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:h5Income:showCharts",
                url: baseURL+"customerStatis/getH5ExpandPriceContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showH5IncomeCharts2(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getForwardIncome3:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:income:incomeChart",
                url: baseURL+"customerStatis/getForwardAreaExpandPriceContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showForwardIncomeCharts2(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getIp:function (time,timeType) {


            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                    type: "POST",
                    permit:"compareChart:ip:ipCharts",
                    url: baseURL+"ip/findIpContrastChart",
                    data: JSON.stringify(data),
                    contentType:'application/json;charset=utf-8',
                    success: function(result){
                             if(result.code == 0){//登录成功
                            //console.log(result.result)
                            _this.ipTotal(result.data,timeType);
                             ipLoading = false;
                             }else{
                            layer.msg(result.msg);
                        }
                    }
                });

        },
        getIncomeData:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:income:incomeChart",
                url: baseURL+"articleStatis/getCustomerExpandPriceContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showIncome(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getIpUseData:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:''
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:ipUse:ipUseChart",
                url: baseURL+"articleStatis/getCustomerStatisIpContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showIpUse(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getActiveUser:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:'',
                timeType:timeType
            };
            ajaxc({
                    type: "POST",
                    permit:'compareChart:activeUsers:activeUsersCharts',
                    url: baseURL+"statis/getActiveUserChartContrast",
                    data: JSON.stringify(data),
                    contentType:'application/json;charset=utf-8',
                    success: function(result){
                        if(result.code == 0){//登录成功
                            //console.log(result.result)
                            _this.activeUsers(result.result,timeType);
                        }else{
                            layer.msg(result.msg);
                        }
                    }
        })},
        getNewUser:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:'',
                timeType:timeType
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:newUsers:newUsersCharts",
                url: baseURL+"statis/getNewUserChartContrast",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.newUsersOption(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getBadIp:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:'',
                timeType:timeType
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:badIp:badIpCharts",
                url: baseURL+"domainsta/findLockedDomainContrastChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.badIp(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
        getNewArticle:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:'',
                timeType:timeType
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:newArticle:newArticleCharts",
                url: baseURL+"/statis/getNewArticleLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.articleTotal(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        },
       getForwardArticle:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:'',
                timeType:timeType
            };
            ajaxc({
                    type: "POST",
                    permit:"compareChart:forwardArticle:forwardArticleCharts",
                    url: baseURL+"/statis/getForwardArticleLineChart",
                    data: JSON.stringify(data),
                    contentType:'application/json;charset=utf-8',
                    success: function(result){
                            if(result.code == 0){//登录成功
                            //console.log(result.result)
                           _this.shareArticle(result.result,timeType);
                        }else{
                            layer.msg(result.msg);
                        }
                    }
             });

        },
        getShareArticleNum:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:'',
                timeType:timeType
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:shareArticleNum:lineChart",
                url: baseURL+"/articleStatis/getSharedArticleNumLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.showShareArticleNum(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });

        },
        getSharePeoples:function (time,timeType) {
            var _this = this;
            var data = {
                dateTime:time?time:'',
                timeType:timeType
            };
            ajaxc({
                type: "POST",
                permit:"compareChart:sharePeoples:sharePeoplesCharts",
                url: baseURL+"articleStatis/getForwardArticlePeopleLineChart",
                data: JSON.stringify(data),
                contentType:'application/json;charset=utf-8',
                success: function(result){
                    if(result.code == 0){//登录成功
                        //console.log(result.result)
                        _this.sharePeoples(result.result,timeType);
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });

        },
        chartInt:function (id,title) {

            var _this = this;
            // 基于准备好的dom，初始化echarts实例
            var myChart = echarts.init(document.getElementById(id));
            // console.log(myChart)
            // 指定图表的配置项和数据
            var option = {
                title: {
                    text: title
                },
                tooltip: {
                    trigger: 'axis',
                    axisPointer: {
                        type: 'cross',
                        label: {
                            backgroundColor: '#6a7985',
                            formatter:function (params) {
                                return parseFloat(params.value).toFixed(0)
                            }
                        }
                    }
                },
                //color:['#2ec770','#1c97f5'],
                legend: {
                    type: 'scroll',
                    //orient: 'vertical',
                    left: '10%',
                    right:'230px',
                    top:'40px'
                },
                grid: {
                    left: '3%',
                    right: '4%',
                    bottom: '3%',
                    top:'90px',
                    containLabel: true
                },
                toolbox: {
                    feature: {
                        saveAsImage: {}
                    }
                },
                xAxis: {
                    type: 'category',
                    boundaryGap: false,
                    name:'时间',
                    nameLocation:'start',
                    axisLabel: {
                        showMaxLabel: true
                    },
                    axisPointer:{
                        label:{
                            formatter:'{value}'
                        }
                    },
                    data:_this.setHours()
                },
                yAxis: {
                    type: 'value',
                    name:'数量'
                },
                color:['#2d8cf0','#19be6b', '#ff9900', '#e46cbb', '#9a66e4','#ed3f14','#CC9900','#9999FF','#996600','#009900','#336666','#666600','#9999CC'],
                dataZoom:[],
                series:[]
            };

            // 使用刚指定的配置项和数据显示图表。
            myChart.setOption(option,true);

        },
        commonOption:function (id,title,legendArr,yTData,xAxis,timeType) {

            var legendArrs = {};
            for(var i=0;i<legendArr.length;i++){
                legendArrs[legendArr[i]]=true;
            }
           var _this = this;
            // 基于准备好的dom，初始化echarts实例
            var myChart = echarts.init(document.getElementById(id));
            // console.log(myChart)
            var dataZoomOpt;
            var axLabel = {
                formatter:'{value}'
            };
            if(timeType != "minute"){
                axLabel = {
                    formatter:function (params) {
                        // console.log(params.value);
                        var val  = params.value;
                       // console.log(params.value.indexOf('30'))
                        return params.value.indexOf('30')>-1? params.value + " ~ " + params.value.split(":")[0] + ":59" :timeType == 'semih'? params.value + " ~ " + params.value.split(":")[0] + ":30":params.value + " ~ " + params.value.split(":")[0] + ":59" ;
                    }
                };

            }
            if(title=='IP数' || timeType != "minute" || title=='ip消耗' || title=='收益'){
                dataZoomOpt = [];
            }else{
                dataZoomOpt = [{
                    startValue: '00:00'
                }, {
                    type: 'inside'
                }];

            }
            // 指定图表的配置项和数据
            var option = {
                title: {
                    text: title
                },
                tooltip: {
                    trigger: 'axis',
                    axisPointer: {
                        type: 'cross',
                        label: {
                            backgroundColor: '#6a7985',
                            formatter:function (params) {
                                return parseFloat(params.value).toFixed(0)
                            }
                        }
                    }
                },
                //color:['#2ec770','#1c97f5'],
                legend: {
                    selected:legendArrs,
                    type: 'scroll',
                   // orient: 'vertical',
                    data:legendArr,
                    left: '10%',
                    right:'230px',
                    top:'40px'
                },
                grid: {
                    left: '3%',
                    right: '4%',
                    bottom: '3%',
                    top:'90px',
                    containLabel: true
                },
                toolbox: {
                    feature: {
                        saveAsImage: {}
                    }
                },
               xAxis: {
                    type: 'category',
                    boundaryGap: false,
                    name:'时间',
                    nameLocation:'start',
                    axisLabel: {
                        showMaxLabel: true
                    },
                    axisPointer:{
                        label:axLabel
                    },
                    data:xAxis
                },
                yAxis: {
                    type: 'value',
                    name:'数量'
                },
                color:['#2d8cf0','#19be6b', '#ff9900', '#e46cbb', '#9a66e4','#ed3f14','#CC9900','#9999FF','#996600','#009900','#336666','#666600','#9999CC'],
                dataZoom:dataZoomOpt,
                series:yTData
            };

            $('#'+id+'_select').change(function(e){
                for(var item in option.legend.selected){
                    option.legend.selected[item] = false;
                }
                if($(this).val()){
                    for(var k=0;k<$(this).val().length;k++){
                        option.legend.selected[$(this).val()[k]]=true;
                    }
                }

                myChart.setOption(option,true);
            })
            // 使用刚指定的配置项和数据显示图表。
            myChart.setOption(option,true);

        },
        loopOpt:function (platFormList,countList) {
            var legendArr = [];
            //console.log(platFormList)
            platFormList.map(function (item) {
                legendArr.push(item.nickName);
            });
            var seriesData = [];
            for(var i = 0;i< platFormList.length;i++){
                for(var j = 0;j<countList.length;j++){
                    if(platFormList[i].platformId == countList[j].platformId){
                        var obj = {
                            name:platFormList[i].nickName,
                            type:'line',
                            smooth: true,
                            data:countList[j].counts
                        };
                        seriesData.push(obj);
                    }
                }
            };
            var params = {
                legend:legendArr,
                seriesData:seriesData
            };
            return params;
        },
        newUsersOption:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('newUsers','新增用户',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        activeUsers:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('activeUsers','活跃用户',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        ipTotal:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('ipTotal','IP数',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        articleTotal:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('articleTotal','新增文章',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        badIp:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('badIp','被封域名',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        shareArticle:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('shareArticle','转发文章数',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        sharePeoples:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('sharePeoples','转发文章人数',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showIncome:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('income','收益',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showIpUse:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('ipUse','ip消耗',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showShareArticleNum:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('shareArticleNum','转发文章次数',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showForwardIncomeCharts2:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('forwardIncome3','转发区收益',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showH5IncomeCharts2:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('h5Income3','h5收益',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showForwardIpUseCharts2:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('forwardIpUse3','转发区IP消耗',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showH5IpUseCharts2:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('h5IpUse3','h5IP消耗',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showNewTotalIncomeCharts2:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('newTotalInocme3','新广告系统收益',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showNewForwardIncomeCharts2:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('newForwardInocme3','新广告系统转发区收益',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showNewH5IncomeCharts2:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('newH5Inocme3','新广告系统h5收益',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showNewIpUseCharts2:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('newIpUse3','新广告系统IP消耗',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showNewForwardIpUseCharts2:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('newForwardIpUse3','新广告系统转发区IP消耗',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showNewH5IpUseCharts2:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('newH5IpUse3','新广告系统h5IP消耗',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showForwardOutIncome3:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('forwardOutIncome3','转发区外部收益',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showForwardInsideIncome3:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('forwardInsideIncome3','转发区内部收益',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showForwardOutIpUse3:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('forwardOutIpUse3','转发区外部ip消耗',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showForwardInsideIpUse3:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('forwardInsideIpUse3','转发区内部ip消耗',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showNewForwardOutIncome3:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('newForwardOutIncome3','新转发区外部收益',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showNewForwardInsideIncome3:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('newForwardInsideIncome3','新转发区内部收益',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showNewForwardOutIpUse3:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('newForwardOutIpUse3','新转发区外部ip消耗',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showNewForwardInsideIpUse3:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('newForwardInsideIpUse3','新转发区内部ip消耗',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showComparePriceIp3:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('comparePriceIp3','竞价ip消耗',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        },
        showComparePriceExpend3:function (data,timeType) {
            var _this = this;
            var saveData = _this.loopOpt(data.platformList,data.countList);
            this.commonOption('comparePriceExpend3','竞价收益',saveData.legend,saveData.seriesData,data.xaxis,timeType);
        }
    };
</script>
<style>
    .exportExcelBtn{
        padding: 6px 10px;
        background-color: #0C0C0C;
        color: #fff;
        font-size: 14px;
        border-radius: 2px;
    }
    .exportExcelBtn:hover{
        cursor: pointer;
    }
    .exportExcelBox{
        margin-bottom: 20px;
    }
</style>